﻿#region
/* ===============================================
 * 作者：guopeng           时间：2012/2/4 10:21:12
 * 
 * 
 * 类描述：商家实体
 * 考虑代理情况，可能一个用户代理着N个商家的扩展
 * 
 * =============================================== */
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace Jobs.Inf.Entity
{
    [Table("Advertiser")]
    public class Advertiser
    {
        /// <summary>
        /// 商家Id
        /// </summary>
        [Column("Id",TypeName="int")]
        [Key]
        [DatabaseGenerated(System.ComponentModel.DataAnnotations.DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        /// <summary>
        /// 代理人。对应Member中用户名
        /// </summary>
        [Column("Agent",TypeName="varchar")]
        [StringLength(45)]
        [Required]
        public string Agent { get; set; }

        /// <summary>
        /// 商家名
        /// </summary>
        [Column("CompanyName",TypeName="nvarchar")]
        [StringLength(200)]
        [Required]
        public string CompanyName { get; set; }

        /// <summary>
        /// 关于商家
        /// </summary>
        [Column("About",TypeName="nvarchar")]
        [StringLength(2000)]
        [Required]
        public string About { get; set; }

        /// <summary>
        /// 公司地址
        /// </summary>
        [Column("Location",TypeName="nvarchar")]
        [StringLength(200)]
        public string Location { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [Column("Phone",TypeName="nvarchar")]
        [StringLength(200)]
        public string Phone { get; set; }

        /// <summary>
        /// 联系邮箱
        /// </summary>
        [Column("EMail",TypeName="nvarchar")]
        [StringLength(200)]
        public string EMail { get; set; }
        
        /// <summary>
        /// 是否是官方认证商家
        /// </summary>
        [Column("Identification",TypeName="bit")]
        public bool Identification { get; set; }
    }
}
